from keras_preprocessing import sequence

cutlen = 10


def padding(x_train):
    """

    :param x_train:
    :return:
    """
    return sequence.pad_sequences(x_train, cutlen)


x_ = [[2, 49, 10, 33, 81, 19, 7, 45, 71, 100, 88, 22],
      [1, 2, 3, 4, 5, 6]]
res_ = padding(x_)
print(res_)
